rem get working directory
FOR /F %i IN ('chdir') DO SET wd=%i